package com.yznote.cloudesk.user.mapper;

import com.yznote.cloudesk.common.pojo.Result;
import com.yznote.cloudesk.common.pojo.User;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestBody;

import java.time.LocalDateTime;
import java.util.List;

@Mapper
@Component
public interface UserMapper {
    User login(String userName, String password);

    int register(User user);

    int havaUserName(String userName);

    int setLoginTime(Long userId, String lastLoginIp, LocalDateTime loginTime);

    User getUserMsg(Long userId);


    List<User> getUserByName(String userName);

    List<User> getAllUsers();
}
